home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re Writing to a SUSink.1 < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  2.2 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Writing to a SUSink
  2. Sent:        9/18/96 10:39 PM
  3. Received:    9/18/96 10:39 PM
  4. From:        Jerome Jahnke <j-jahnke@uchicago.edu>
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. >At 1:04 PM 9/18/96, Jerome Jahnke wrote:
  10. >>I decided at a later date to make a part I had been working into an
  11. >>embeddable part. So what I did is steal all the code from a new embeddable
  12. >>part made with PartMaker but I can't open it.
  13. >>
  14. >>When I create the stationary I have this in my CBaseContent class.
  15. >>
  16. >>        unsigned long count = fProxyList->Count();
  17. >>        archive << count;
  18. >>
  19. >>But when I try to open the stationry my Internalize function which looks
  20. >>like this.
  21. >>
  22. >>        unsigned long count;
  23. >>        archive >> count;
  24. >>
  25. >>says that count is 0x0000FFFF instead of 0x00000000 which is what I put
  26. >>there. So why are the last four bytes F's instead of 0's and should I
  27. >>convert those to FW_Fixed's which seem to write OK. I haven't tried that,
  28. >>but this is the next step. I am curious if The sink is only reading or
  29. >>writing the first four bytes. Or if I am doing something really really
  30. >>wrong.
  31. >
  32. >Jer,
  33. >
  34. >The code you show should work correctly. I suspect that somewhere else
  35. >you've got unbalanced reads and writes, so you're actually reading the
  36. >wrong set of four bytes. Trace through both the write path and the read
  37. >path and make sure everything is properly balanced.
  38.  
  39. I did this, and when I change the value to short. It works fine. I thought
  40. it was an unbalanced reading pair as well.
  41.  
  42. Jer,
  43.  
  44.  ----------------------------------------------------------------------------
  45. | Jerome Jahnke                     | Well I was only a kid                  |
  46. | University of Chicago             | Didn't know enough to be afraid        |
  47. | Biological Sciences Division      | Playing the game                       |
  48. | Office of Academic Computing      | But not the way the big boys played    |
  49. | j-jahnke@uchicago.edu             | Nothing to lose maybe I had something  |
  50. | http://bsdac.uchicago.edu/~jahnke | to trade.                     N. Peart |
  51.  ----------------------------------------------------------------------------er,